package antGraph;

import entities.Ant;
import graph.Vertex;

import java.util.ArrayList;
import java.util.List;

public class AntVertex extends Vertex {

	private List<Ant> ants;
	
    private boolean isFood = false;

	public AntVertex(int row, int col) {
		super(row, col);
		ants = new ArrayList<Ant>();
	}

	public AntVertex(List<Ant> ants, int row, int col) {
		super(row, col);
		this.ants = ants;
	}

	public void addAnt(Ant ant) {
		ants.add(ant);
	}
	
	public List<Ant> getAnts() {
		return ants;
	}

	public void setFood(boolean isFood) {
		this.isFood = isFood;
	}
	
	public boolean hasFood() {
		return this.isFood;
	}

	@Override
	public String toString() {
		String myString = String.format("(%d,%d)", getCoordinates().getX(), getCoordinates().getY());
		return myString;
	}

}
